package com.fwtai.api;

import com.fwtai.bean.PageFormData;
import com.fwtai.datasource.DaoHandle;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

/**
 * 产品展示访问数据库
 * @作者 田应平
 * @版本 v1.0
 * @创建时间 2024-02-06 19:31:40
 * @QQ号码 444141300
 * @Email service@fwtai.com
 * @官网 <url>http://www.fwtai.com</url>
*/
@Repository
public class ApiProductShowDao{

  private final DaoHandle dao;

  public ApiProductShowDao(final DaoHandle dao){
    this.dao = dao;
  }

  public HashMap<String,Object> queryById(final long kid){
    return dao.queryForHashMap("api_product_show.queryById",kid);
  }

  public List<HashMap<String,Object>> getListData(final PageFormData formData){
    return dao.queryForListHashMap("api_product_show.listData",formData);
  }
}